How to: Use the RANDBETWEEN() function.
Solution:
Select the desired cell. Enter =RANDBETWEEN(<smallest number to return>, <largest number to return>) and press ENTER.
NOTE: The RANDBETWEEN() function returns a random number between two given numbers. For this function to work, the Analysis ToolPak must be installed and enabled.
1) Select the cell where the result of the RANDBETWEEN() function is to be displayed.
2) Type an equal sign and the RANDBETWEEN command:
=RANDBETWEEN()
3) Type the smallest number and the largest number to return within the parentheses of the RANDBETWEEN command.
NOTE: Separate the numbers with a comma, no spaces.
EXAMPLE: =RANDBETWEEN(1,100)
4) Press ENTER.